<table style="width: 100%;" class="mainmenu5" cellpadding="0" cellspacing="0" border="0">
<tr>
    <td width="7"><img src="design/pic/spacer.gif" class="sqr1" alt="" height="7" width="7" /></td>
    <td class="block_header">{language text="my_top_friends"}</td>
</tr>
</table>

{if $sLimit}
<div style="padding:10px;font-size:10pt;">
	{language text="top.limit.reached" extra=$sLimit}
</div>
{/if}

<table style="width:100%;" cellpadding="4" cellspacing="5">
{section name=I loop=$aTop}
	<td style="width:33%;text-align:center;" class="color">
		<a href="{url link='public.user' name=$aTop[I].friend}">
			{$aTop[I].friend}
		</a>
		<div>
         <a href="{url link='public.user' name=$aTop[I].friend}">
			{Account::Avatar sUser=$aTop[I].friend iSize=75 class="pic1" onmouseover="showInfo5('`$aTop[I].friend`', '', '');this.className='pic2';" onmouseout="this.className='pic1';return nd();"}
		</a>
		</div>
		<div style="padding:5px;"><a class="link_action" href="{url link='public.account.friends' act='unmake_top' user=$aTop[I].friend}">[ {language text="unmake_top_friend"} ]</a></div>
	</td>
{if $smarty.section.I.iteration % 3 == 0}
</tr>
<tr>
{/if}
{sectionelse}
<tr>
	<td style="font-size:10pt;text-align:center;" class="color">
	{language text="Mod_Account.no.top.friends"}
	</td>
</tr>
{/section}
<tr>
<td></td>
</tr>
</table>

<br />
<br />

<table style="width: 100%;" class="mainmenu5" cellpadding="0" cellspacing="0" border="0">
<tr>
    <td width="7"><img src="design/pic/spacer.gif" class="sqr1" alt="" height="7" width="7" /></td>
    <td class="block_header">{language text="friends_list"}</td>
</tr>
</table>
{if $aFriends}
	<br />
    {* START PICS AND INFO *}
    {if 'full' == $sMode}
    {include file="$sRootPath/_blocks/pager.html"}
    <table style="width:100%;" cellpadding="4" cellspacing="5">
        {foreach from=$aFriends item=aFriend name=friends}
        <tr>
            <td style="vertical-align:middle;" class="border2">
            <table style="width:100%;">
                <tr>
                    <td style="width:30%;text-align:center;font-size:8pt;">
                    <a href="{url link='public.user' name=$aFriend.user}">
                        {Account::Avatar sUser=$aFriend.user iSize=75 class="pic1" onmouseover="showInfo5('`$aFriend.user`', '', '');this.className='pic2';" onmouseout="this.className='pic1';return nd();"}
                    </a>

                    <div style="padding:5px;"><a class="link_action" href="{url link='public.account.friends' mode=$sMode act='delete_friend' user=$aFriend.user}" onclick="return sure();">[ {language text="delete"} ]</a></div>
                    {if $aFriend.is_top_friend}
                        <div style="padding:5px;"><a class="link_action" href="{url link='public.account.friends' act='unmake_top' user=$aFriend.user}">[ {language text="unmake_top_friend"} ]</a></div>
                    {else}
                        <div style="padding:5px;"><a class="link_action" href="{url link='public.account.friends' act='make_top' user=$aFriend.user}">[ {language text="make_top_friend"} ]</a></div>
                    {/if}
                    </td>
                    <td style="width:70%;vertical-align:top;font-size:8pt;" class="color"><b>{language text="username"}</b>: <a class="link_description" href="{url link='public.user' name=$aFriend.user}"> {$aFriend.user}</a> <br />
                    <div style="padding-top:4px;"><b>{language text="location"}</b>:
                        {include file="`$sRootPath`/_blocks/flag.html" sFlagLocation=$aFriend.location} {$aFriend.location}
                    </div>
                    <div style="padding-top:4px;"><b>{language text="age"}</b>: {$aFriend.age}</div>
                    <div style="padding-top:4px;"><b>{language text="activity"}</b>: <span>{include file="`$sRootPath`/_blocks/stars.html aUserStarsInfo=$aFriend.stars}</span></div>
                    </td>
                </tr>
            </table>
            </td>
        </tr>
        {/foreach}
        <tr>
            <td></td>
        </tr>
    </table>
    {include file="$sRootPath/_blocks/pager.html"}
    {/if}
    {* END PICS AND INFO LIST*}

    {* START PICS ONLY *}
    {if 'short' == $sMode}
    {include file="$sRootPath/_blocks/pager.html"}
    <table style="width:100%;" cellpadding="5" cellspacing="0">

        <tr class="border13"> {*or empty*}
        {foreach from=$aFriends item=aFriend name=friends}
            <td style="text-align:center;vertical-align:middle;">
            <table style="margin-left:auto;margin-right:auto;">
                <tr>
                    <td style="font-size:8pt;" class="color">
                    <div><b><a class="link_description" href="{url link='public.user' name=$aFriend.user}"> {$aFriend.user}</a> </b></div>

                    <a href="{url link='public.user' name=$aFriend.user}">
                        {Account::Avatar sUser=$aFriend.user iSize=75 class="pic1" onmouseover="showInfo5('`$aFriend.user`', '', '');this.className='pic2';" onmouseout="this.className='pic1';return nd();"}
                    </a>
                    <div style="padding:5px;">[ <a href="{url link='public.account.friends' act='delete_friend' mode=$sMode user=$aFriend.user}" onclick="return sure();"> {language text="delete_383"} </a> ]</div>
                    {if $aFriend.is_top_friend}
                        <div style="padding:5px;">[ <a href="{url link='public.account.friends' act='unmake_top' user=$aFriend.user}"> {language text="unmake_top_friend_629"} </a> ]</div>
                    {else}
                        <div style="padding:5px;">[ <a href="{url link='public.account.friends' act='make_top' user=$aFriend.user}"> {language text="make_top_friend_630"} </a> ]</div>
                    {/if}
                    </td>
                </tr>
            </table>
            </td>
            {if $smarty.foreach.friends.iteration % $iRowSize == 0}
            </tr>
            <tr class="{if ($smarty.foreach.friends.iteration/$iRowSize)%2 == 0}border13{/if}">
            {/if}
        {/foreach}
        {if $smarty.foreach.friends.total % $iRowSize != 0}
            <td colspan="{$iRowSize}">&nbsp;</td>
        {/if}
        </tr>
    </table>
    {include file="$sRootPath/_blocks/pager.html"}
    {/if}
    {* END PICS ONLY *}
{else}
    <table style="width:100%;">
        <tr>
            <td><div class="message_info">{language text="there_are_no_friends_yet"}</div></td>
        </tr>
    </table>
{/if}